home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr22
/
ext2err.zip
/
EXT2ERR.DOC
< prev
next >
Wrap
Text File
|
1993-04-14
|
3KB
|
81 lines
┌─────────────────────────────────────┐
│ EXTension-2-ERRorlevel EXT2ERR v1.0 │
└─────────────────────────────────────┘
Copyright (C)1992 R.Janorkar
Release date 08/20/92
EXTension-2-ERRorlevel is a simple utility that translates a
file extension passed to it on the command line into a DOS
errorlevel. Operation is fully configurable through use of a
configuration file that lets you define which file extension
translates to what errorlevel.
This utility was primarily written for use with automatic file
scanning on Wildcat BBSes, but has a wider variety of uses,
allowing branching within DOS BATCH files using IF ERRORLEVEL
statements.
This software is Copyright (C)1992 R.Janorkar, all rights are
reserved. No fee is expected for using this software, distribute
freely. This software is provided with NO warrantees, expressed
or implied. Use it at your own risk. The author will NOT be
liable for any damages, direct or indirect, arising from the
ability or disability to use this software.
Syntax:
EXT2ERR <d:\path\config.ext> <filespec.ext>
where <d:\path\config.ext> is the full drive:\path\filename and
extension of the configuration file;
and <filespec.ext> is the actual filename and extension that is
to be evaluated.
EXT2ERR uses a configuration file that allows you to specify
each file extension and the associated errorlevel to return.
This configuration file can be named anything, but must contain
the data in the following format:
ZIP = 200
GIF = 100
TXT = 010
The last line MUST end with a carriage return (ENTER), all
errorlevels MUST be in three digit format with leading zeros
when needed. Matches will be made on exact case matches ONLY,
the use of all CaPiTaLs (UPPER case) is recommended. Only one
entry per line, EXT2ERR is limited to matching ONLY three
character extensions.
The filename.extension passed on the command line may contain a
full drive:\path specification too, but only the actual file
extension is evaluated. If no match is found an errorlevel of
ZERO is returned.
One must keep in mind the strange method that DOS uses for
evaluating errorlevels in BATch files. This statement:
IF ERRORLEVEL 100 GOTO LABEL100
will branch if the errorlevel is EQUAL TO OR GREATER than 100.
So an errorlevel of 101 will still be evaluated as true. The
only acceptable method of using errorlevels in BATch files is to
start with the highest errorlevel and count backwards:
IF ERRORLEVEL 101 GOTO LABEL101
IF ERRORLEVEL 100 GOTO LABEL100
IF ERRORLEVEL 99 GOTO LABEL99
please refer to you DOS documentation for more information.
EXT2ERR can set errorlevels from 0 to 255.
If there are any problems, bugs or suggestions, you can contact
the author on the Photographers Network BBS (718) 876-0337.